package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.whq.dao.AccessTokenMapper;
import com.whq.entity.AccessToken;
import com.whq.service.AccessTokenService;

import javax.annotation.Resource;

@Service(value = "tdAccessTokenService")
public class AccessTokenServiceImpl implements AccessTokenService {

    @Autowired
    private AccessTokenMapper<AccessToken> tdAccessTokenMapper;
    
    @Override
    public Integer insertSelective(AccessToken tdAccessToken) throws Exception {
           return this.tdAccessTokenMapper.insertSelective(tdAccessToken);
        }

    @Override
    public Integer insertBatch(List<AccessToken> tdAccessToken) throws Exception {
           return this.tdAccessTokenMapper.insertBatch(tdAccessToken) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdAccessTokenMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdAccessTokenMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(AccessToken tdAccessToken) {
           return this.tdAccessTokenMapper.updateByPrimaryKeySelective(tdAccessToken);
    }

    @Override
    public AccessToken findById(Object id) {
           return (AccessToken) this.tdAccessTokenMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<AccessToken> selectByCondition(AccessToken tdAccessToken) {
           return (List<AccessToken>) this.tdAccessTokenMapper.selectByCondition(tdAccessToken);
    }

    @Override
    public Integer selectCountByCondition(AccessToken tdAccessToken) {
           return  this.tdAccessTokenMapper.selectCountByCondition(tdAccessToken);
    }

}
